package mobi.bantu.config;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * Created by tancw on 2017/2/20.
 */
@Component
public class SysConf {

    @Resource
    private Environment environment;

    private static Environment env;


    @PostConstruct
    public void init() {
        env = this.environment;
    }

    public static String get(String key) {
        return env.getProperty(key);
    }
}
